<script>
	const obj = {}
	let value = 'henry', age = 18
	let reflectRes = Reflect.defineProperty(obj, 'name', {
		configurable: true,
		// 写法一
		// value: 'henry',
		// 写法二
		get() {
			return value
		},
		set(val) {
			obj.value = val
		}
	})

	let objeectRes = Object.defineProperty(obj, 'age', {
		configurable: true,
		// 写法一
		// value: 18,
		// 写法二
		get() {
			return age
		},
		set(val) {
			obj.age = val
		}
	})

	console.log(obj, reflectRes) //=> {name: 'henry', age: 18} true
	console.log(obj, objeectRes) //=> {name: 'henry', age: 18} {name: 'henry', age: 18}
</script>